<template>
	<view>
		<view class="open-card">
			<view class="btn-box">
				<image class="vip" src="../../static/image/vip.jpg" mode=""></image>
				<van-button custom-style="width:200rpx;height:70rpx;margin-top:30rpx;margin-right:20rpx;" @click="open"
					color='#326EF8' round>开通会员
				</van-button>
				<van-button custom-style="width:200rpx;height:70rpx;margin-top:20rpx;margin-right:20rpx;"
					@click="toBind" color='#1DD66C' round>立即绑卡
				</van-button>

			</view>
		</view>
	</view>
</template>

<script>
	import {
		getCinemaInfo
	} from '../../common/http/api.js'
	export default {
		data() {
			return {
				cinemaTel: "",
			}
		},
		methods: {
			toBind() {
				if (!this.$store.state.userPhone) {
					uni.navigateTo({
						url: "../../pages/getPhone/getPhone"
					})
					return
				}
				uni.navigateTo({
					url: "../../pages/bindCard/bindCard"
				})
			},
			toCoupons() {

				uni.navigateTo({
					url: "../../pages/buyCoupon/buyCoupon"
				})
			},
			open() {
				uni.navigateTo({
					url: "../../pages/openCard/openCardList"
				})

			},

			getCinemaInfo() {
				getCinemaInfo().then(res => {
					this.cinemaTel = res.cinemaPhone
				})
			},


		},
		created() {
			this.getCinemaInfo()

		}
	}
</script>

<style lang="scss">
	.open-card {
		width: 92vw;
		height: 200rpx;
		margin: 20rpx auto;
		background-size: 100% 100%;
		border-radius: 10rpx;
		box-shadow: 8rpx 8rpx 8rpx #999;
		position: relative;
		display: flex;
		justify-content: flex-end;
		border-radius: 20rpx;
		overflow: hidden;

		.btn-box {

			width: 350rpx;

			display: flex;
			flex-direction: column;
			align-items: flex-end;

			.vip {
				position: absolute;
				width: 92vw;
				height: 200rpx;
				left: 0;
				top: 0;
			}

			.bind-card {
				border: 1px solid #fff;

				height: 60rpx;
				border-radius: 40rpx;
				font-size: 26rpx;
				padding: 2rpx 0;
				width: 160rpx;
				text-align: center;
				background-color: #fff;
				color: royalblue;

				text {
					line-height: 60rpx;
				}
			}


		}

	}

	.other-server {
		width: 90vw;
		margin: 20rpx auto;
		background-color: #fff;
		padding: 20rpx;
		border-radius: 10rpx;
		font-size: 28rpx;
		box-shadow: 8rpx 8rpx 8rpx #e0e0eb;

		.server-title {
			border-bottom: 1px solid #f0f0f5;
			padding-bottom: 20rpx;
		}

		.server-moudle {
			display: flex;

			padding: 40rpx 25rpx;

			.moudle-item {
				display: flex;
				flex-direction: column;
				align-items: center;
				margin-right: 35rpx;


				.item-img {
					width: 60rpx;
					height: 60rpx;
					border-radius: 50%;
					display: flex;
					justify-content: center;
					align-items: center;

					image {
						width: 60rpx;
						height: 60rpx;
						margin-bottom: 20rpx;
					}
				}

				.name {
					font-size: 24rpx;
					color: #999;
				}
			}
		}
	}
</style>